<template>
	<view class="mheader">
		<view class="left" @tap = "touserinfo">
			<image class="img"  :src="userinfo.imgurl"></image>
		</view>
		<view class="title">
			<span class = "titletext">WIKI</span>
		</view>
		<view class="right">		
			<view>
				<image src="../../static/images/commom/search.png" class="img" @tap="tosearch"></image>
				<image src="../../static/images/commom/Add.png" class="img" @tap = "creategroup"></image>
			</view>	
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			};
		},
		props:{
			userinfo:{
				default:{},
				type:Object
			}
		},
		methods:{
			touserinfo(){
				this.$emit('touserdetail',this.userinfo)
			},
			tosearch(){
				uni.navigateTo({
					url:"../../pages/search/search"
				})
			},
			creategroup(){//创建新群			
				uni.navigateTo({
					url:"../../pages/buildgruop/buildgruop"
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.mheader{
		position: fixed;
		width: 100%;
		box-sizing: border-box;
		height: 120rpx;
		display: flex;
	}
	.left{
		height: 100%;
		width: 160rpx;
		flex: 0 0 160rpx;
		box-sizing: border-box;
		padding-top: 15rpx;
		padding-left: 36rpx;
		.img{
			box-sizing: border-box;
			display: block;
			width: 90rpx;
			height: 90rpx;
			border-radius: 50%;
			border: 4rpx solid rgba(52, 199, 88, 100);
		}
	}
	.right{
		height: 100%;
		width: 160rpx;
		flex: 0 0 160rpx;
		.img{
			display: inline-block;
			width: 48rpx;
			height: 48rpx;
			padding: 0 10rpx;
			padding-top: 42rpx;
		}
	}
	.title{
		flex: 1;
		height: 120rpx;
		text-align: center;
		.titletext{
			line-height: 120rpx;
			color: rgba(52, 199, 88, 100);
			font-size: 60rpx;
			text-align: center;
			font-family: Times New Roman-regular;
		}
	}
	
	
</style>
